package com.yibo.support.helper;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;

/**
 * http工具
 *
 * @author zhanglei
 */
public class HttpKit {

    private static Logger LOGGER = LoggerFactory.getLogger(HttpKit.class);


    public static HttpServletRequest  request(){
        try {
            HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        }catch (Exception e){
            LOGGER.info("find  httpServletRequest request null!",e);
        }
        return null;
    }
}
